alter table jms_dm.dm_cusc_entity_customer_network_province_kg_summary_month_dt
    set tblproperties ('external.table.purge' = 'true');
drop table jms_dm.dm_cusc_entity_customer_network_province_kg_summary_month_dt;
CREATE EXTERNAL TABLE jms_dm.dm_cusc_entity_customer_network_province_kg_summary_month_dt
(
    customer_entity_code   string COMMENT '客户实体code',
    customer_entity_name   string COMMENT '客户实体name',
    customer_network_code  string COMMENT '客户网点code',
    customer_network_name  string COMMENT '客户网点name',
    customer_agent_code    string COMMENT '客户代理区code',
    customer_agent_name    string COMMENT '客户代理区name',
    customer_virt_code     string COMMENT '客户虚拟代理区code',
    customer_virt_name     string COMMENT '客户虚拟代理区name',
    customer_code          string COMMENT '客户code',
    customer_name          string COMMENT '客户name',
    receiver_province_id   string COMMENT '签收省份id',
    receiver_province_name string COMMENT '签收省份name',
    kg_part                decimal(8, 1) COMMENT '重量段',
    kg_part_two            string COMMENT '重量段文字',
    weight_total           decimal(8, 2) COMMENT '总重量',
    waybill_num            int COMMENT '揽收量',
    customer_waybill_num   int COMMENT '客户揽收量',
    entity_waybill_num     int COMMENT '客户实体揽收量',
    date_time              string COMMENT '日期',
    update_time            string comment '更新时间'
) COMMENT '客户实体重量段分析报表'
    PARTITIONED BY (
        dt string COMMENT '月第一天')
    STORED AS PARQUET
    LOCATION '/dw/hive/jms_dm.db/external/dm_cusc_entity_customer_network_province_kg_summary_month_dt'
; 